package com.crm.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 公司
 * </p>
 *
 * @author zjd
 * @since 2021-04-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("user_company")
@ApiModel(value="Company对象", description="公司")
public class Company extends Model {

    private static final long serialVersionUID = 1L;

    @TableId(type=IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "公司域名")
    private String companyDomain;

    @ApiModelProperty(value = "公司名称")
    private String name;

    @ApiModelProperty(value = "父公司id")
    private Long parentCompanyId;

    @ApiModelProperty(value = "创建用户id")
    private Long createUserId;

    @ApiModelProperty(value = "所属用户id")
    private Long ownerUserId;

    @ApiModelProperty(value = "所属行业id")
    @TableField("Industry_id")
    private Long industryId;

    @ApiModelProperty(value = "公司类型 合伙人，代理商，供应商，其他")
    private Long type;

    @ApiModelProperty(value = "地址")
    private String stateRegion;

    @ApiModelProperty(value = "城市")
    private String city;

    @ApiModelProperty(value = "邮政编码")
    private String postalCode;

    @ApiModelProperty(value = "公司员工数量")
    private Long employeeNumber;

    @ApiModelProperty(value = "公司时区")
    private String timeZone;

    @ApiModelProperty(value = "年收入")
    private BigDecimal annualRevenue;

    @ApiModelProperty(value = "联系电话")
    private String phoneNumber;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableLogic
    private Long isDelete;

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Long version;


}
